package cn.iocoder.yudao.module.product.controller.app.spu.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "用户 App - 商品 SPU Response VO")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AppProductSpuRespVO extends AppDenominationVO{

    @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
    private String name;

    @Schema(description = "商品简介", example = "清凉小短袖简介")
    private String introduction;

    @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long categoryId;

    @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED)
    private String picUrl;

    @Schema(description = "商品轮播图", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<String> sliderPicUrls;

    // ========== SKU 相关字段 =========

    @Schema(description = "规格类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean specType;

    @Schema(description = "库存", example = "666")
    private Integer stock;

    // ========== 营销相关字段 =========

    // ========== 统计相关字段 =========

    @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Integer salesCount;

    // ========== 新增SPU 相关字段 =========

    @Schema(description = "录入货币", example = "USD")
    private String currencyCode;

    @Schema(description = "售卖渠道, 售卖渠道, 0: 通用，1：支付宝，2：微信")
    private Integer salesChannel;

    // ========== eSim，新增SPU 相关字段 =========

    private List<Long> skuIds;

    @Override
    public Long getSpuId() {
        return id;
    }

    @Override
    public String getCardCurrencyCode() {
        return currencyCode;
    }
}
